* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
  background-color: #2a3132;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

#game-container {
  position: relative;
  width: 800px;
  height: 600px;
  background-color: #44633f;
  border-radius: 5px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

#game-canvas {
  position: absolute;
  top: 0;
  left: 0;
}

.hud {
  position: absolute;
  top: 10px;
  left: 10px;
  color: white;
  font-size: 18px;
  font-weight: bold;
  text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.7);
  z-index: 10;
}

.level-up {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 48px;
  color: gold;
  font-weight: bold;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 10;
}

.start-screen {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 20;
}

.start-screen h1 {
  color: gold;
  font-size: 48px;
  margin-bottom: 20px;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

.start-button {
  background-color: #ff5722;
  color: white;
  border: none;
  padding: 15px 30px;
  font-size: 24px;
  font-weight: bold;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.start-button:hover {
  background-color: #ff7043;
  transform: scale(1.05);
}

.game-over {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s;
}

.game-over h1 {
  color: red;
  font-size: 48px;
  margin-bottom: 20px;
  text-shadow: 0 0 10px rgba(255, 0, 0, 0.8);
}

.restart-button {
  background-color: #2196f3;
  color: white;
  border: none;
  padding: 15px 30px;
  font-size: 24px;
  font-weight: bold;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.restart-button:hover {
  background-color: #42a5f5;
  transform: scale(1.05);
}

.weapon-info {
  position: absolute;
  bottom: 10px;
  left: 10px;
  color: white;
  font-size: 16px;
  text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.7);
  z-index: 10;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 5px 10px;
  border-radius: 5px;
}

.xp-bar-container {
  position: absolute;
  top: 40px;
  left: 10px;
  width: 200px;
  height: 15px;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 10px;
  z-index: 10;
}

.xp-bar {
  height: 100%;
  width: 0;
  background-color: #4caf50;
  border-radius: 10px;
  transition: width 0.3s ease;
}

.health-bar-container {
  position: absolute;
  top: 65px;
  left: 10px;
  width: 200px;
  height: 15px;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 10px;
  z-index: 10;
}

.health-bar {
  height: 100%;
  width: 100%;
  background-color: #f44336;
  border-radius: 10px;
  transition: width 0.3s ease;
}

.upgrade-screen {
  position: absolute;
  width: 100%;
  height: 100%;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 20;
}

.upgrade-screen h1 {
  color: gold;
  font-size: 48px;
  margin-bottom: 10px;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

.upgrade-screen h2 {
  color: white;
  font-size: 24px;
  margin-bottom: 20px;
}

.upgrade-options {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.upgrade-card {
  width: 200px;
  background-color: rgba(50, 50, 50, 0.9);
  border: 2px solid #777;
  border-radius: 10px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.2s;
}

.upgrade-card:hover {
  transform: scale(1.05);
  border-color: gold;
}

.upgrade-card h3 {
  color: #4caf50;
  margin-bottom: 10px;
  text-align: center;
}

.upgrade-card p {
  color: white;
  font-size: 14px;
  margin-bottom: 15px;
  text-align: center;
  flex-grow: 1;
}

.upgrade-button {
  background-color: #2196f3;
  color: white;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  font-weight: bold;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s;
}

.upgrade-button:hover {
  background-color: #42a5f5;
  transform: scale(1.05);
}